package com.dduggs.activemq.springjms.producer;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class JmsAppProducer {
    public static void main(String[] args) {
        ApplicationContext context =new ClassPathXmlApplicationContext("producer.xml");
        ProducerService service=context.getBean(ProducerService.class);
        for (int i = 0; i < 10; i++) {
            service.sendMessage("test "+i);
        }
        ((ClassPathXmlApplicationContext) context).close();
    }
}
